-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding capability to specify primary key #78
Conversation
I'd like to get some version of this in the codebase. Can you explain:
|
@@ -91,31 +91,25 @@ void save(SQLiteDatabase db) { | |||
if (!"id".equalsIgnoreCase(column.getName())) { | |||
if (columnType.equals(Short.class) || columnType.equals(short.class)) { | |||
values.put(columnName, (Short) columnValue); | |||
} | |||
else if (columnType.equals(Integer.class) || columnType.equals(int.class)) { | |||
} else if (columnType.equals(Integer.class) || columnType.equals(int.class)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to keep style changes separate from feature additions.
I added a .gitignore file because IDEs create a build folder that needs excluding. You're right it should be protected rather than public. |
Which IDE are you using? I'm using Eclipse and it doesn't create any of those files you're adding to the .gitignore. |
Android Studio, which is superseding Eclipse as the recommended IDE for android development. I don't see how adding 2 lines to the ignore file is doing any harm? |
Gotcha. Thanks for the heads up.
|
This update allows the user to override the auto-generated primary key with one of their own. Useful for when using Sugar to synchronise data with another source.
Usage:
Example: